package cn.riverluoo.parse;

import java.io.File;

import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;

import org.xml.sax.SAXException;

import cn.riverluoo.console.ConsoleTextArea;



public class ShowSax {

    public void show(String newname) throws Exception{

        ConsoleTextArea ct=new ConsoleTextArea();
        ct.showConsole();

        // 1.实例化SAXParserFactory对象
        SAXParserFactory factory = SAXParserFactory.newInstance();
        // 2.创建解析器
        SAXParser parser = factory.newSAXParser();
        // 3.获取需要解析的文档，生成解析器,最后解析文档
        File f = new File(newname);
        SaxParse dh = new SaxParse();
        parser.parse(f, dh);

    }

}
